-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feat] Support usage of separate Linode API for the domain client #436
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mabojars
force-pushed
the
fix-dns-client-customization
branch
from
August 2, 2024 09:32
c154348
to
b17e444
Compare
mabojars
changed the title
[feat] Support independent Linode domain client configuration
[feat] Support usage of separate Linode API for the domain client
Aug 2, 2024
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #436 +/- ##
==========================================
- Coverage 66.27% 66.14% -0.13%
==========================================
Files 76 76
Lines 3887 3908 +21
==========================================
+ Hits 2576 2585 +9
- Misses 1122 1131 +9
- Partials 189 192 +3 ☔ View full report in Codecov by Sentry. |
mabojars
force-pushed
the
fix-dns-client-customization
branch
from
August 2, 2024 09:55
d34d064
to
3e8d316
Compare
mabojars
force-pushed
the
fix-dns-client-customization
branch
from
August 2, 2024 13:33
096434f
to
2d35126
Compare
mabojars
force-pushed
the
fix-dns-client-customization
branch
from
August 2, 2024 14:11
2d35126
to
6cd8baa
Compare
eljohnson92
previously approved these changes
Aug 2, 2024
eljohnson92
approved these changes
Aug 2, 2024
AshleyDumaine
approved these changes
Aug 2, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
okokes-akamai
added a commit
to okokes-akamai/linode-cloud-controller-manager
that referenced
this pull request
Aug 15, 2024
We're hitting the same issue as here: linode/cluster-api-provider-linode#436 We use a custom CA and it doesn't get used. Given that we construct an http.Transport that is of a different concrete type than http.Transport (it just needs to be a RoundTripper), resty fails and defaults to an empty client, discarding our CA.
10 tasks
okokes-akamai
added a commit
to linode/linode-cloud-controller-manager
that referenced
this pull request
Aug 15, 2024
We're hitting the same issue as here: linode/cluster-api-provider-linode#436 We use a custom CA and it doesn't get used. Given that we construct an http.Transport that is of a different concrete type than http.Transport (it just needs to be a RoundTripper), resty fails and defaults to an empty client, discarding our CA.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
Which issue(s) this PR fixes: N/A
Special notes for your reviewer:
LINODE_DNS_URL
- equivalent of theLINODE_URL
, but applies only to the DNS client.LINODE_DNS_CA
- equivalent of theLINODE_CA
, but applies only to the DNS client. If we target a different API instance thanLINODE_URL
, we might also need to provide different root CA certs.ClientConfig
), to keep things from becoming messy with the new parameters. Used as a DTO right after startup.info
level log informing about the fallback ofLINODE_DNS_TOKEN
toLINODE_TOKEN
happening. I've noticed this happens silently, and it would be nice to know.oauth2.Transport
. This caused the custom TLS configuration to be silently discarded, due to an unexpected interaction with resty. The flow would go like this:LINODE_CA
env var to a valid*.pem
path.CreateLinodeClient
gets called, passing anoauth2.Transport
(encapsulated in anoauth2.client
) tolinodego.NewClient
.oauth2.Transport
as anhttp.Transport
and silently discards the TLS config.Transport
.Transport
tohttp.Transport
, but fails to do so (we provide anoauth2.Transport
), and the flow errors out, yielding and unchanged client.controller test suite with events/logs
. We've agreed with @eljohnson92 this does not bring much value, while being troublesome to maintain and debug.TODOs: